package registnet.base;

import java.util.List;

/**
 * This class provides default implementations for the <code>ICourse</code> interface.
 */
public abstract class AbstractCourse implements ICourse {

	/**
	 * The code for the course.
	 */
	protected String courseCode;
	
	/**
	 * The name of the course.
	 */
	protected String courseName;
	
	/**
	 * The list of prerequisites of the course;
	 */
	protected List<Prerequisite> prerequisites;
	
	/**
	 * The unit count of the course;
	 */
	protected int unit;
	
	/**
	 * The semester by which the course is supposed to be taken in a particular curriculum.
	 */
	protected int semester;
	
	/**
	 * The year by which the course is supposed to be taken in a particular curriculum.
	 */
	protected int year;
	
	/**
	 * The ranking value of the course. Rank is used in the enlistment process.
	 */
	protected int rank;
	
	@Override
	public void addPrerequisite(Prerequisite prerequisite) {
		prerequisites.add(prerequisite);
	}
	
	@Override
	public String getCourseCode() {
		return courseCode;
	}
	
	@Override
	public String getCourseName() {
		return courseName;
	}
	
	@Override
	public List<Prerequisite> getPrerequisites() {
		return prerequisites;
	}
	
	@Override
	public int getSemester() {
		return semester;
	}
	
	@Override
	public int getUnit() {
		return unit;
	}
	
	@Override
	public int getYear() {
		return year;
	}
	
	@Override
	public void setCourseCode(String courseCode) {
		this.courseCode = courseCode;
	}
	
	@Override
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	@Override
	public void setSemester(int semester) {
		this.semester = semester;
	}
	
	@Override
	public void setUnit(int unit) {
		this.unit = unit;
	}
	
	@Override
	public void setYear(int year) {
		this.year = year;
	}
	
	@Override
	public int getRank() {
		return rank;
	}

	@Override
	public void setRank(int rank) {
		this.rank = rank;
	}

}
